package com.geeksonsecurity.malwaredemo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class OverlayActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.linkedin_overlay);

        Button submitButton = (Button) findViewById(R.id.submit);

        submitButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(getApplicationContext(), "Thanks for giving your credentials to the malware, but don't worry the credentials are still safe!", Toast.LENGTH_SHORT).show();
                Intent intent = new Intent(getApplicationContext(), MainService.class);
                intent.setAction(ServiceCommunication.STOP_OVERLAY);
                startService(intent);
                finish();
            }
        });
    }
}
